Gravity axis determination apparatus and mobile terminal apparatus using the same

ABSTRACT

A gravity axis determination apparatus which can determine the gravity direction in a short time. The apparatus is low in cost and has a simple construction. Data values of acceleration data trains in a same time zone are mutually compared and one of the three axes is determined as a gravity axis.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 12/591,432,filed on Nov. 19, 2009. Furthermore, this application claims the benefitof priority of Japanese application 2008-297923, filed Nov. 21, 2008.The disclosures of these prior U.S. and Japanese application areincorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to a gravity axis determination apparatus fordetermining a gravity axis on the basis of acceleration in each axis andalso to a mobile terminal apparatus using the gravity axis determinationapparatus.

2. Description of the Related Arts

In recent years, portable mobile terminal apparatuses such as cellularphones and music players that have a display for displaying still imagesand motion images have widely been spread. Among such terminalapparatuses, there are apparatuses having a function for displayingimages in such a way that a direction of a display screen on the displayis fixed to a predetermined direction irrespective of whether theterminal itself is placed in the longitudinal direction or in thelateral direction. For example, a mobile terminal apparatus in which adegree of inclination and a direction of the mobile terminal aredetected and an image is displayed on a display screen on the basis of avirtual display screen region obtained from the degree of inclinationand the direction has been disclosed in Japanese Patent Kokai No.2000-56893 (Patent Literature 1).

Ordinarily, terminals performing the displaying process have anacceleration sensor for detecting a magnitude and a direction of anacceleration of each of an X axis, a Y axis, and a Z axis anddiscriminates a direction of gravity on the basis of the acceleration ofeach axis. A process for obtaining a direction of a gravity accelerationby using the acceleration sensor is also used in a car navigationapparatus or the like which can be classified into the mobile terminalapparatus. For example, Japanese patent kokai No. 11-190743 (PatentLiterature 2) discloses a triaxial acceleration detecting apparatus formounting in a mobile body and which obtains an inclination angle and aninclination direction of the mobile body on the basis of an accelerationin a Z-axis direction and obtains a component in an X-axis direction ofa gravity acceleration from the inclination angle and the inclinationdirection.

SUMMARY OF THE INVENTION

In the inventions disclosed in Patent Literatures 1 and 2 mentionedabove, however, there is a problem that a predetermined time is neededuntil a discrimination result is obtained, since the inclination angleand the inclination direction of the terminal or the mobile body arecalculated when the direction of the gravity is determined. Since it isnecessary to provide a circuit for executing a calculating process,there also is a problem of increase of circuit scale which results incost increase.

The invention has been made in view of the problems as mentioned aboveand it is an object of the invention to provide a gravity axisdetermination apparatus which can discriminate a direction of gravity ina short time and has a low-cost and simple construction, and to providea mobile terminal apparatus using the gravity axis determinationapparatus.

According to the invention, there is provided a gravity axisdetermination apparatus for determining and detecting one of three axesconstituting a three-dimensional space as a gravity axis, comprising: asignal generating part for generating at least two axis accelerationsignals each indicating an acceleration in each of directions of atleast two axes among the three axes; a fetching part for fetching eachof the axis acceleration signals as at least two axis acceleration datatrains; and a determining and detecting part for comparing data valuesof the axis acceleration data trains in a same time zone, determiningone of the three axes as the gravity axis, and generating a detectionsignal indicating the gravity axis.

According to the invention, there also is provided a mobile terminalapparatus including an image display part, comprising: a signalgenerating part for generating at least two axis acceleration signalseach indicating an acceleration in each of directions of at least twoaxes among three axes constructing a three dimensional space; a fetchingpart for fetching each of the axis acceleration signals as at least twoaxis acceleration data trains; a determining and detecting part forcomparing data values of the axis acceleration data trains in a sametime zone, determining one of the three axes as the gravity axis, andgenerating a detection signal indicating the gravity axis; and an imagedisplay control part for allowing the image display part to display animage corresponding to image data in horizontal and vertical directionsaccording to the detection signal.

According to the gravity axis determination apparatus of the invention,the gravity axis can be determined by a low-cost and simple constructionin a short time. According to the mobile terminal apparatus of theinvention, the image can be displayed onto the monitor so that it can beeasily seen.

BRIEF DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 is a block diagram indicating a gravity axis determinationapparatus according to an embodiment of the present invention;

FIG. 2 is a diagram indicating a correspondence between a cellular phonehandset and acceleration axes;

FIG. 3 is a time chart indicating an example of an axis accelerationdata train of each of an X axis, a Y axis, and a Z axis;

FIG. 4 is a flowchart indicating an example of a gravity axisdiscrimination processing routine;

FIG. 5 is a block diagram indicating the cellular phone handset in whichthe gravity axis determination apparatus is mounted;

FIGS. 6A and 6B are diagrams indicating a correspondence between adirection of the cellular phone handset and a display screen; and

FIG. 7 is a flowchart indicating an example of another gravity axisdiscrimination processing routine.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An embodiment according to the invention will be described below indetail with reference to the drawings.

FIG. 1 is a block diagram indicating a gravity axis determinationapparatus 1 in the embodiment. The gravity axis determination apparatus1 is built in a personal digital assistant (hereinbelow, abbreviated toPDA) such as a cellular phone handset and is used to adjust a displayingdirection of a display screen on a display in accordance with adirection and an inclination of the terminal itself. The gravity axisdetermination apparatus 1 includes an acceleration sensor 10, a filter20, a microprocessor 30, and a monitor 40.

The acceleration sensor 10 is a triaxial acceleration sensor forgenerating three axis acceleration signals each indicating magnitude anddirection of acceleration in each of an X axis, a Y axis, and a Z axisconstructing a three-dimensional space. The acceleration sensor 10 is,for example, an MEMS (micro electro mechanical systems) accelerationsensor obtained by forming an acceleration detecting mechanism by asemiconductor process. The detecting mechanism of the MEMS accelerationsensor may be one of a piezoresistance type, an electrostaticcapacitance type, and a thermo-sensitive type. The sensor has suchperformance that a range of, for example, ± a few grams can be measuredand it can follow an acceleration fluctuation within a range from 0 Hzto about a few hundreds Hz.

The acceleration sensor 10 generates the axis acceleration signal inwhich, for example, a signal level is indicated by a range of ±1 withrespect to each of the X axis, the Y axis, and the Z axis. That is, thedirection of the acceleration is indicated by the sign of ± and themagnitude of the acceleration is indicated by its absolute value. Thegravity axis determination apparatus 1 is built, for example, in acellular phone handset 100 as shown in FIG. 2. The X axis and the Y axiscross perpendicularly each other. The Y axis corresponds to alongitudinal direction of the cellular phone handset 100 and the X axiscorresponds to a lateral direction, respectively. The Z axis correspondsto a thickness direction (which perpendicularly crosses an XY plane) ofthe cellular phone handset 100.

The acceleration sensor 10 generates the axis acceleration signal of thesignal level according to the direction (inclination) of the cellularphone handset 100. In the X axis, when a right side of the cellularphone handset 100 faces a ground GD, it shows the signal level of −, andwhen a left side faces the ground GD, it shows the signal level of +. Inthe Y axis, when an upper side of the cellular phone handset 100 facesthe ground GD, it shows the signal level of −, and when a lower sidefaces the ground GD, it shows the signal level of +. In the Z axis, whena front side (the side where the monitor 40 exists) of the cellularphone handset 100 faces the ground GD, it shows the signal level of −,and when a back side faces the ground GD, it shows the signal level of+.

For example, if the cellular phone handset 100 is fixed so that itslower side faces the ground GD as illustrated in the diagram, the signallevel of each of the X axis and the Z axis is equal to 0 and the signallevel of the Y axis is equal to +1. If the cellular phone handset 100 isrotated clockwise by 90° from the direction shown in the diagram andfixed, the signal level of each of the Y axis and the Z axis is equal to0 and the signal level of the X axis is equal to −1. In addition, inaccordance with the direction (inclination) of the cellular phonehandset 100, the acceleration sensor 10 generates the axis accelerationsignal in which the signal level is indicated in the range of ±1 withrespect to each of the X axis, the Y axis, and the Z axis.

The filter 20 is a low pass filter for removing frequency components of,for example, 200 Hz or higher contained in the axis acceleration signalof each of the X axis, the Y axis, and the Z axis from the accelerationsensor 10. There is a case where the user of the cellular phone handset100 watches the image displayed on the monitor 40 while, for example,walking or running. Since the cellular phone handset 100 quivers in thelongitudinal and lateral directions or rotates during the motion such asrunning, high frequency components are contained in the axisacceleration signal. If the displaying direction of the display screenwas switched on the basis of the axis acceleration signal containing thehigh frequency components, since the displaying direction of the displayscreen is frequently switched and the displayed image becomes hard tosee, the high frequency components are removed in order to avoid it.

Since the microprocessor 30 executes a routine according to a gravityaxis determining program and discriminates the gravity axis, it includesan acceleration data fetching part 31 and a determining and detectingpart 32. Details of the program will be described hereinafter withreference to FIG. 4.

The acceleration data fetching part 31 fetches the axis accelerationsignal regarding each of the X axis, the Y axis, and the Z axis in whichthe high frequency components have been removed by the filter 20 as anaxis acceleration data train consisting of axis acceleration dataobtained by sampling the axis acceleration signal at a predeterminedsampling interval. In other words, the acceleration data fetching part31 samples an instantaneous value of the acceleration of each axis atthe predetermined sampling interval, thereby obtaining the axisacceleration data train of each axis. As a data value of the axisacceleration data, a magnitude and a direction of the acceleration atthe fetching point of time are indicated by a range of, for example, ±1.That is, the direction of the acceleration is indicated by the sign of ±and the magnitude of the acceleration is indicated by its absolutevalue. The axis acceleration data train is a data train consisting of aplurality of axis acceleration data. The filter 20 can be also realizedby the microprocessor 30 in a software manner.

The sampling interval at which the acceleration data fetching part 31obtains the axis acceleration data train can be properly set accordingto an application and a function of the terminal in which the gravityaxis determination apparatus 1 has been mounted. For example, if thegravity axis determination apparatus 1 was mounted in the cellular phonehandset 100 and used in common with a pedometer, since the user carriesthe cellular phone handset 100, the sampling interval is set based on awalking speed. Assuming that a maximum frequency of the walking is equalto 4 Hz, since an interval of one step is equal to 250 milliseconds, theacceleration data fetching part 31 obtains the axis acceleration datatrain at an interval shorter than it. In the case of measuring thenumber of steps further accurately, it is desirable to measure bydetecting a change in acceleration at several points of time during themotion of one walking step. In the case of detecting the change inacceleration during the operation of one step at, for example, fourpoints and measuring the number of steps, therefore, it is necessary toobtain the axis acceleration data train at an interval of 62.5milliseconds. Since a larger number of acceleration changes per step canbe obtained by measuring at a further short interval, the number ofsteps can be measured more accurately. It is desirable to measure at aninterval of 30 milliseconds.

The determining and detecting part 32 discriminates the gravity axis andthe gravity direction on the basis of the axis acceleration data trainof each of the X axis, the Y axis, and the Z axis obtained by theacceleration data fetching part 31. The determining and detecting part32 includes an axis determining part 33 and a detection signalgenerating part 34.

The axis determining part 33 mutually compares the magnitudes of theacceleration indicated by the axis acceleration data of the respectiveaxes of the X axis, the Y axis, and the Z axis from the accelerationdata fetching part 31 (hereinbelow, referred to as an accelerationcomparison) and determines one of those axes as a gravity axis.

The axis determining part 33 discriminates the gravity axis on the basisof a result of at least one acceleration comparison. The number of timesof the acceleration comparison for determining the gravity axis can bearbitrarily set.

If a mode in which the gravity axis is determined on the basis of theresult of the one acceleration comparison was set, the axis determiningpart 33 mutually compares the absolute value of the acceleration of theX axis indicated by the X-axis acceleration data, the absolute value ofthe acceleration of the Y axis indicated by the Y-axis accelerationdata, and the absolute value of the acceleration of the Z axis indicatedby the Z-axis acceleration data which are derived from the accelerationdata fetching part 31 in the same time zone and determines the axiscorresponding to the acceleration of the largest absolute value as agravity axis. For example, with respect to the magnitude of theacceleration indicated by the axis acceleration data from theacceleration data fetching part 31, assuming that the magnitude valuesin the X axis, the Y axis, and the Z axis are equal to −0.99, 0.05, and0.07, respectively, the X axis corresponding to the largest absolutevalue is determined as a gravity axis.

If a mode in which the gravity axis is determined on the basis of theresults of the acceleration comparison of a plurality of times was set,the axis determining part 33 mutually compares the X-axis accelerationdata train, the Y-axis acceleration data train, and the Z-axisacceleration data train from the acceleration data fetching part 31 in apredetermined determining period of time and determines one of the Xaxis, the Y axis, and the Z axis as a gravity axis. In detail, if it isdetermined the predetermined number of times with lapse of time that theabsolute value of the acceleration regarding one of the X axis, the Yaxis, and the Z axis is larger than the absolute values of theacceleration of the other axes in the predetermined determining periodof time, the one axis is determined as a gravity axis.

FIG. 3 is a time chart indicating an example of axis acceleration datatrains DTx, DTy, and DTz of the respective axes of the X axis, the Yaxis, and the Z axis. The axis acceleration data train DTx consists of aplurality of axis acceleration data dx. The axis acceleration data trainDTy consists of a plurality of axis acceleration data dy. The axisacceleration data train DTz consists of a plurality of axis accelerationdata dz. Each of the axis acceleration data dx, dy, and dz is timesequentially shown in the direction of an axis of abscissa. In each ofthe axis acceleration data dx, dy, and dz, the absolute value of theacceleration regarding each corresponding axis is shown as a data value.The axis acceleration data in which the absolute value indicates themaximum acceleration among the axis acceleration data dx, dy, and dz isindicated by a square painted in black. For example, the data indicatingthe maximum acceleration at time t0 of the same fetching timing by theacceleration data fetching part 31 is the axis acceleration data dy.

With respect to the axis acceleration data train fetched by theacceleration data fetching part 31 at an interval of, for example, 30milliseconds, if the axis determining part 33 determines only thepredetermined number of times such as four times that the absolute valueof the acceleration regarding the X axis at the same fetching timing islarger than the absolute value of the acceleration of each of the Y axisand the Z axis in a predetermined determining period of time TM such as240 milliseconds (α in the diagram), the X axis is determined as agravity axis.

It is also possible to construct in such a manner that the axisdetermining part 33 obtains the axis acceleration data of the respectiveaxes of the X axis, the Y axis, and the Z axis from the accelerationdata fetching part 31 at an interval of, for example, 30 millisecondsand performs the acceleration comparison, and if it is continuouslydetermined only the predetermined number of times such as four timesthat the absolute value of the acceleration regarding the X axis at thesame fetching timing is larger than the absolute value of theacceleration of each of the Y axis and the Z axis, the X axis isdetermined as a gravity axis. That is, when the X axis is the axis ofthe maximum acceleration for 120 milliseconds (=30 milliseconds×4) as atleast a predetermined determining period of time, the axis determiningpart 33 determines that the X axis is the gravity axis.

FIG. 4 is a flowchart indicating an example of a gravity axisdiscrimination processing routine which is realized by executing theprogram by the microprocessor 30. The microprocessor 30 repeats thegravity axis discrimination processing routine at an interval of, forexample, 30 milliseconds.

First, the acceleration data fetching part 31 fetches the axisacceleration data of each of the X axis, the Y axis, and the Z axis fromthe acceleration sensor 10 (step S101).

Subsequently, the axis determining part 33 mutually compares theabsolute values of the acceleration indicated by the axis accelerationdata of the respective axes of the X axis, the Y axis, and the Z axis.First, when the axis determining part 33 determines that the absolutevalue of the acceleration regarding the X axis is larger than theabsolute value of the acceleration of each of the Y axis and the Z axis(the absolute value of the acceleration regarding the X axis is maximum)(step S102), it discriminates whether a sign of the acceleration of theX axis is equal to + or − (step S103). If it is decided that the sign ofthe acceleration of the X axis is equal to +, a count value M regardingthe − direction of the X axis, a count value T regarding the + directionof the Y axis, a count value S regarding the − direction of the Y axis,a count value V regarding the + direction of the Z axis, and a countvalue U regarding the − direction of the Z axis are reset, that is, M=0,T=0, S=0, V=0, and U=0 (step S104) and, at the same time, +1 is added toa count value N regarding the + direction of the X axis (step S105).When the axis determining part 33 determines that the count value N hasreached a predetermined discrimination value Nmax (step S106), itdecides the X axis as a gravity axis and determines that the + directionof the X axis is a gravity direction (step S107).

The count value N is a value indicating the number of times ofdiscrimination in the case where the axis determining part 33 hascontinuously determined that the acceleration in the + direction of theX axis is larger than the acceleration of each of the − direction of theX axis, the Y axis, and the Z axis. The predetermined discriminationvalue Nmax is a value indicating the predetermined number of times ofdiscrimination necessary to decide that the + direction of the X axis isthe gravity direction. The predetermined discrimination value Nmax (thepredetermined number of times of discrimination) is equal to, forexample, 4 times. In the case, when the axis determining part 33continuously determines four times that the acceleration in the +direction of the X axis is maximum, it decides that the + direction ofthe X axis is the gravity direction. Even after completion of thegravity axis discrimination processing routine, the axis determiningpart 33 holds the count values N, M, T, S, V, and U and uses them uponexecution of the next gravity axis discrimination processing routine.

When the axis determining part 33 determines in step S103 that the signof the acceleration of the X axis is equal to −, the count values N, T,S, V, and U are reset, that is, N=0, T=0, S=0, V=0, and U=0 (step S108)and, at the same time, +1 is added to the count value M regarding the −direction of the X axis (step S109). When the axis determining part 33determines that the count value M has reached a predetermineddiscrimination value Mmax (step S110), it decides the X axis as agravity axis and determines that the − direction of the X axis is thegravity direction (step S111). The predetermined discrimination valueMmax is a value indicating the predetermined number of times ofdiscrimination necessary to decide that the − direction of the X axis isthe gravity direction.

When the axis determining part 33 determines in step S102 that theabsolute value of the acceleration of the X axis is not maximum, theprocessing routine advances to step S112. When the axis determining part33 determines that the absolute value of the acceleration of the Y axisis larger than the absolute value of the acceleration of each of the Zaxis and the X axis (the absolute value of the acceleration of the Yaxis is maximum) (step S112), it discriminates whether a sign of theacceleration of the Y axis is equal to + or − (step S113). When the axisdetermining part 33 determines that the sign of the acceleration of theY axis is equal to +, the count values N, M, S, V, and U are reset, thatis, N=0, M=0, S=0, V=0, and U=0 (step S114) and, at the same time, +1 isadded to the count value T regarding the + direction of the Y axis (stepS115). When the axis determining part 33 determines that the count valueT has reached a predetermined discrimination value Tmax (step S116), itdecides the Y axis as a gravity axis and determines that the + directionof the Y axis is the gravity direction (step S117). The count value T isa value indicating the number of times of discrimination in the casewhere the axis determining part 33 has continuously determined that theacceleration in the + direction of the Y axis is larger than theacceleration of each of the − direction of the Y axis, the Z axis, andthe X axis. The predetermined discrimination value Tmax is a valueindicating the predetermined number of times of discrimination necessaryto decide that the + direction of the Y axis is the gravity direction.

When the axis determining part 33 determines in step S113 that the signof the acceleration of the Y axis is equal to −, the count values N, M,T, V, and U are reset, that is, N=0, M=0, T=0, V=0, and U=0 (step S118)and, at the same time, +1 is added to the count value S regarding the −direction of the Y axis (step S119). When the axis determining part 33determines that the count value S has reached a predetermineddiscrimination value Smax (step S120), it decides the Y axis as agravity axis and determines that the − direction of the Y axis is thegravity direction (step S121). The predetermined discrimination valueSmax is a value indicating the predetermined number of times ofdiscrimination necessary to decide that the − direction of the Y axis isthe gravity direction.

When the axis determining part 33 determines in step S112 that theabsolute value of the acceleration of the Y axis is not maximum, theprocessing routine advances to step S122. The axis determining part 33determines that the absolute value of the acceleration of the Z axis islarger than the absolute value of the acceleration of each of the Y axisand the X axis (the absolute value of the acceleration of the Z axis ismaximum), and discriminates whether a sign of the acceleration of the Zaxis is equal to + or − (step S122). When the axis determining part 33determines that the sign of the acceleration of the Z axis is equal to+, the count values N, M, T, S, and U are reset, that is, N=0, M=0, T=0,S=0, and U=0 (step S123) and, at the same time, +1 is added to the countvalue V regarding the + direction of the Z axis (step S124). When theaxis determining part 33 determines that the count value V has reached apredetermined discrimination value Vmax (step S125), it decides the Zaxis as a gravity axis and determines that the + direction of the Z axisis the gravity direction (step S126). The count value V is a valueindicating the number of times of discrimination in the case where theaxis determining part 33 has continuously determined that theacceleration in the + direction of the Z axis is larger than theacceleration of each of the − direction of the Z axis, the X axis, andthe Y axis. The predetermined discrimination value Vmax is a valueindicating the predetermined number of times of discrimination necessaryto decide that the + direction of the Z axis is the gravity direction.

When the axis determining part 33 determines in step S122 that the signof the acceleration of the Z axis is equal to −, the count values N, M,T, S, and V are reset, that is, N=0, M=0, T=0, S=0, and V=0 (step S127)and, at the same time, +1 is added to the count value U regarding the −direction of the Z axis (step S128). When the axis determining part 33determines that the count value U has reached a predetermineddiscrimination value Umax (step S129), it decides the Z axis as agravity axis and determines that the − direction of the Z axis is thegravity direction (step S130). The predetermined discrimination valueUmax is a value indicating the predetermined number of times ofdiscrimination necessary to decide that the − direction of the Z axis isthe gravity direction.

The detection signal generating part 34 receives the axis accelerationdata of the respective axes of the X axis, the Y axis, and the Z axisfrom the acceleration data fetching part 31 and generates a detectionsignal indicating that the direction of the acceleration regarding theaxis (one of the X axis, the Y axis, and the Z axis) which has beendetermined as a gravity axis by the axis determining part 33, that is,one of the six kinds of directions of the + direction of the X axis, the− direction of the X axis, the + direction of the Y axis, the −direction of the Y axis, the + direction of the Z axis, and the −direction of the Z axis is the gravity direction (step S131).

FIG. 5 is a block diagram indicating the cellular phone handset 100 inwhich the gravity axis determination apparatus 1 is mounted. Thecellular phone handset 100 includes the gravity axis determinationapparatus 1, the monitor 40, an image storing memory 41, and an imagedisplay control part 42.

The monitor 40 is, for example, a display and displays an image based onimage data stored in the image storing memory 41. The image storingmemory 41 is a memory such as a RAM for storing the image data. Theimage display control part 42 is, for example, a microprocessor or thelike for allowing the image according to the image data stored in theimage storing memory 41 to be displayed onto the monitor 40 in thehorizontal and vertical directions according to the detection signalfrom the gravity axis determination apparatus 1.

The image display control part 42 allows the monitor 40 to display theimage in the horizontal and vertical directions decided on the basis ofthe gravity direction indicated by the detection signal from thedetection signal generating part 34 included in the gravity axisdetermination apparatus 1. In the case where, for example, the gravitydirection is equal to the + direction of the Y axis, the image displaycontrol part 42 allows the monitor 40 to display a display screen asillustrated in FIG. 6A. In the case where the gravity direction is equalto the + direction of the X axis, the image display control part 42allows the monitor 40 to display the display screen as depicted in FIG.6B. That is, the monitor 40 switches the display screen so that thedirection of the image faces the ground in a predetermined direction anddisplays the image.

For example, if the cellular phone handset 100 has been held in such amanner that both of the vertical direction (Y-axis direction) and thelateral direction (X-axis direction) of the cellular phone handset 100are inclined for the ground at an angle near 45°, the magnitude of theacceleration of the Y axis and the magnitude of the acceleration of theX axis are equal to almost the same value. In the case, the axiscorresponding to the maximum acceleration (referred to a maximumacceleration axis hereinbelow) is frequently switched between the X axisand the Y axis. That is, if the axis determining part 33 determined thegravity axis on the basis of the result of one acceleration comparison,the axis which is decided as a gravity axis is frequently switchedbetween the X axis and the Y axis. In the case where only when the axisdetermining part 33 has continuously determined only the predeterminednumber of discrimination times by the gravity axis determining processas mentioned above that one axis is the maximum acceleration axis, theaxis is decided as a gravity axis, the gravity axis is not frequentlyswitched and the gravity axis can be determined at high precision.

As mentioned above, according to the gravity axis determinationapparatus of the embodiment, the absolute values of the acceleration ofthe respective axes of the X axis, the Y axis, and the Z axis aremutually compared and the axis corresponding to the acceleration of thelargest absolute value is decided as a gravity axis. According to theinvention, therefore, since there is no need to calculate theinclination angle and the inclination direction of the terminal in orderto discriminate the gravity axis, the gravity axis determinationapparatus in which the gravity direction can be determined in a shorttime, the circuit construction can be simplified, and the costs are lowcan be constructed.

According to the embodiment, in the case where it has been determinedonly the predetermined number of discrimination times in thepredetermined period of time that the absolute value of the accelerationregarding one of the X axis, the Y axis, and the Z axis is larger thanthe absolute values of the acceleration of the other axes, the one axisis decided as a gravity axis. In the case where, for example, theterminal is inclined so that each of the X axis and the Y axis isinclined for the ground at an angle near 45° and the axis of the maximumacceleration has frequently been switched between the X axis and the Yaxis in a very short time, therefore, the discrimination result of thegravity axis is not changed but becomes constant. In the case,therefore, since the direction of the display screen which is displayedon the display of the terminal is stable without being frequentlyswitched between the X axis and the Y axis, the display screen which canbe easily seen by the user can be displayed.

Although the example in which when it has continuously been determinedonly four times that the absolute value of the acceleration regardingone axis is larger than the absolute values of the acceleration of theother axes, the one axis is decided as a gravity axis has been mentionedabove, the number of discrimination times is not limited but can beproperly set in accordance with the application and function of theterminal in which the gravity axis determination apparatus is mounted.

Although the magnitudes of the acceleration of three axes of the X axis,the Y axis, and the Z axis are mutually compared and the gravity axis isdetermined in the example mentioned above, it is also possible tomutually compare the magnitudes of the acceleration of the two axesamong them and to discriminate the gravity axis. For example, in thecase where the gravity axis determination apparatus is mounted in thecellular phone handset, when the direction of the display screen of thedisplay is changed on the basis of the discrimination result of thegravity axis, if one of the two axes of the X axis and the Y axis isdetermined as a gravity axis, the direction of the display screen can beswitched.

An example of a gravity axis discrimination processing routine in thecase is shown in FIG. 7. The fetching process of the axis accelerationdata of each of the X axis, the Y axis, and the Z axis (step S201) issimilar to that of the foregoing example. Subsequently, whether or notthe magnitude of the acceleration of the Z axis is smaller than apredetermined value such as 0.866 is determined (step S202). That is,the acceleration detection result about the Z axis is used only todiscriminate whether or not an angle between the display screen of thecellular phone handset and the ground is equal to or larger than apredetermined angle such as 30°. It is not used for comparison betweenthe X axis and the Y axis. The angle between the display screen of thecellular phone handset and the ground can be also determined by usingonly the X axis and the Y axis. In the case, when the angle is equal to30°, the magnitudes of the acceleration of the X axis and the Y axis areequal to 0.5. When the magnitude of the acceleration of the Z axis issmaller than the predetermined value, the absolute values of theacceleration of the X axis and the Y axis are compared (step S203). Thesubsequent processes (steps S204 to S222) are executed in a mannersimilar to those mentioned above and one of the + direction of the Xaxis, the − direction of the X axis, the + direction of the Y axis, andthe − direction of the Y axis is determined as a gravity direction.

Although the foregoing embodiment relates to the example in the casewhere the gravity axis determination apparatus has been mounted in thecellular phone handset, for example, a similar effect can be alsoobtained in the case where the gravity axis determination apparatus hasbeen mounted in another mobile terminal apparatus such as a portablepersonal computer.

What is claimed is:
 1. A gravity axis determination method fordetermining and detecting one of three axes constructing athree-dimensional space as a gravity axis, comprising: generating atleast two axis acceleration signals each indicating an acceleration ineach of directions of at least two axes among said three axes; andfetching each of said axis acceleration signals as at least two axisacceleration data trains, wherein when it is determined a plurality oftimes consecutively that an axis acceleration data value in one of saidaxis acceleration data trains is larger than an axis acceleration datavalue in one of axis acceleration data trains other than said one axisacceleration data train in said same time zone, the axis correspondingto said one axis acceleration data train is determined as said gravityaxis.
 2. A method according to claim 1, wherein said plurality of timesis at least four times.
 3. A method according to claim 2, wherein eachof said acceleration signals is fetched at uniform intervals.
 4. Amethod according to claim 1, wherein high frequency components of saidaxis acceleration signal are removed.
 5. A method according to claim 2,wherein high frequency components of said axis acceleration signal areremoved.
 6. A method according to claim 3, wherein high frequencycomponents of said axis acceleration signal are removed.